<!--
 * @Author: sbotlp
 * @Email: sbotlp@sina.com
 * @Date: 2019-11-24 17:17:39
 * @LastEditTime: 2019-11-24 17:40:57
 * @Description: http://www.sbotlp.com.cn
 -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="./vue-2.5.13.js"></script>
</head>
<body>
  render函数.html
  <div id="app">
    <p>{{price}}</p>
    <p>{{name}}</p>
  </div>
  <script>
     var vm = new Vue({
       el:'#app',
       data: {
         price:100,
         name:'sbotlp'
       }
     });
     // 一下是手写的ppt中的render函数
     function render() {
       with(this) { // this 就是 vm
        _c(
          'div',
          {
            attrs: {id:'app'},
          },
          [
            _c('p',[_v(_s(price))]),
            _c('p',[_v(_s(name))])
          ]
        )
       }
     }
     // 不用with
     function render1() {
       return vm._c('div',{id: 'app'},[
         vm._c('p',[vm._v(vm._s(vm.price))]),
         vm._c('p',[vm._v(vm._s(vm.name))])
       ])
     }
  </script>
</body>
</html>